home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / HippoDraw / hippo / README_X11 < prev    next >
Encoding:
Text File  |  1992-04-28  |  4.4 KB  |  103 lines

  1. X11 Driver for Hippo
  2. ====================
  3.  
  4. The X Driver for Hippo uses only standard XLIB calls and should work with
  5. X11R4 and X11R5. There are a number of known bugs and limitations which are
  6. documented below.
  7.  
  8. *** If you are not familiar with X, please look at x11test for a simple
  9. example of using this driver.
  10.  
  11. Usage
  12. -----
  13.  
  14. The compile flag to select the X driver is:
  15.  
  16. _X11_PLOT_
  17.  
  18. To select X as the output device use...
  19.  
  20. h_setPlotDrvr(X11PLOT);
  21.  
  22. When calling h_plot to draw a hippo plot to an X window, four additional 
  23. arguments must be given to the h_plot call.
  24.  
  25. int h_plot(display disp, Display *dpy, Screen *scrn, Drawable Wind, GC gc);
  26.  
  27. Where:
  28.  
  29.     disp   is the Hippo plot to be drawn.
  30.     dpy    is the X display pointer.
  31.     scrn   is the X screen pointer for the screen on which the window resides
  32.     wind   is the window or Pixmap into which the plot is to be drawn.
  33.     gc     is a graphics context suitable for use with wind. The graphics
  34.            context is used to specify the background color for the plot and
  35.            can also be used to specify a clip mask (may be useful when handling
  36.            exposure events).
  37.  
  38. The plot will be scaled to fill the specified drawable. Note that this
  39. routine is intended to be used as a fairly low level routine in some
  40. application requiring X display of histograms. The application is
  41. responsible for handling expose events, and for dealing with redrawing the
  42. plot if the window is resized. A simple example of how to use the X11
  43. driver is given in the demonstration program x11test supplied with hippo.
  44.  
  45. Known bugs and limitations
  46. --------------------------
  47.  
  48. A number of bugs and limitations are known to exist in this version of
  49. hippo's X11 driver.  These are documented below. Any offers to fix or
  50. improve any of these features will be warmly received. The assumption made
  51. in designing hippo's X11 driver is that it will be used for interactive
  52. applications where very high speed redrawing of the display is required.
  53. The desire to avoid duplication of potentially time-consuming tasks is what
  54. leads to a number of the limitiations below.
  55.  
  56. 1) Only Color and Black and White X servers supported.
  57.  
  58. The current version of the X11 driver only supports color X servers with
  59. dynamically allocatable color maps, and black and white servers. All other
  60. servers (eg grey scale or displays with static color maps) are treated as
  61. if they were black and white.
  62.  
  63. 2) Crude recovery for unallocatable color map entries.
  64.  
  65. If the X11 driver is unable to allocate all of the color map entries that
  66. it wants it issues a one time error message, but then continues execution,
  67. resulting in displays which will have "random" colors. A better
  68. implementation would attempt to adjust its display philosophy to the number
  69. of colors available. To display both color and gray scale plots requires a
  70. total of nearly 200 hundred color map entries, so a screen depth of a least
  71. 8 is required.
  72.  
  73. 3) Crude lego plot.
  74.  
  75. The lego plot implemented in the current version of the X11 driver is
  76. intended merely as a proof of principle, rather than a full implementation.
  77. There is no support for labeling the axes, for changing the Z axis or for
  78. changing the stereo angle. In addition the drawing speed could be improved.
  79. Also the plot doesn't always fir in the window
  80.  
  81. 4) Text handling problems.
  82.  
  83. For flexiblity the current version of the X11 driver works with all version
  84. of X after X11R4. No use has been made of the more advanced text handling
  85. features of X11R5. The main limitations imposed by this are in text sizing
  86. and rotated text. The X11 driver attempts to choose an appropriate sized
  87. font, but this process does not always work perfectly. Rotated text is
  88. handled in a manner which requires copying pixmaps between the server and
  89. client. To speed this process up the X11 driver maintains a cache of
  90. previously copied strings which it attempts to reuse. This normally works
  91. ok, but if some graphics attribute (such as the background color) is
  92. changed dynamically the rotated text may be drawn with the old attribute.
  93.  
  94. This could be improved by generating a version of the X11 driver which uses
  95. X11R5 when it is available.
  96.  
  97. 5) Support for multiple display devices.
  98.  
  99. The first time a plot is drawn to an X device, the X11 driver caches
  100. certain characteristics of the server, such as which fonts are available
  101. and what type of device it is. If multiple display devices with different
  102. characteristics are used from the same job this will cause problems.
  103.